<%@page contentType="text/html;charset=UTF-8" language="java" %>
<%
  String basePath = request.getScheme()+"://"+request.getServerName()+":"+
          request.getServerPort()+request.getContextPath()+"/";
%>
<html>
<head>
  <base href="<%=basePath%>">
  <title>网上调查步骤之二</title>
  <meta charset="UTF-8">
</head>
<body>
<%
  request.setCharacterEncoding("UTF-8");
  String name = request.getParameter("name");
  String sex = request.getParameter("sex");

  if(sex.equals("male")) {
    sex = "先生";
  } else {
    sex = "女士";
  }

  session.setAttribute("namesex", name + sex);
%>
<%@include file="top.html"%>
<h3><%=name%><%=sex%>，你好，请选择你的兴趣爱好</h3>

<form name="form2" method="post" action="result.jsp">
  <p><input name="hobby0" type="checkbox" value="影视欣赏">影视欣赏</p >
  <p><input name="hobby1" type="checkbox" value="阅读书籍">阅读书籍</p >
  <p><input name="hobby2" type="checkbox" value="体育运动">体育运动</p >
  <p><input name="hobby3" type="checkbox" value="户外旅游">户外旅游</p >
  <p><input name="hobby4" type="checkbox" value="流行音乐">流行音乐</p >
  <p>
    <input type="submit" name="Submit" value="提交">
    <input type="reset" name="Reset" value="重置">
  </p >
</form>
</body>
</html>